#ifndef __TOOL_H
#define __TOOL_H

#include <stdint.h>
#include <stdio.h>
#include <string.h>

int str_split(char* dst_buf,char* src_str,char* head,int head_num,char* tail,int tail_num);
int str_search(const char* src, char* dst, int num);
uint16_t get_crc(uint8_t* pack, uint16_t length);
uint16_t get_sum(uint8_t* pack, uint16_t length);
int str2hex(char* out_hex, char* in_str, int in_len);
void hex2str(uint8_t* in, uint8_t* out, uint16_t len);
uint16_t u8_2_u16(uint8_t* dat);

#endif //C_SHELL_TOOL_H
